home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
4.2
/
arexx
/
editor
/
flyerlapse.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-04-16
|
4KB
|
163 lines
/* FlyLapse.rexx -- Record frames to a Flyer clip at intervals. */
/* By Arnie Cachelin © 1992 NewTek Inc. */
/* 4.0'ised by Bob Caron, Flyer versioned by Arnie again. */
/* And yet again by Bob Caron. (We just couldn't put this down.) */
/* Current version By Bob Caron (Grue) © 1995 NewTek Inc. */
OPTIONS RESULTS
call remlib('ToasterARexx.port')
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT' , 0)
call addlib('ToasterARexx.port',0)
call set_view(2)
call req_error("Flyer TimeLapse V3.0 --- Record frames to a Flyer clip at intervals.")
drive="FA0:"
clip="TimeLapse"
num=1
do while exists(drive||clip||num)
num=num+1
end
rx startfilereq("Save Clip Where?",drive,clip||num)
exit=1
do while exit=1
file=queryfilereq()
if file=0 then call quit
if file~="" then exit=0
address command "c:wait 1"
end
if exists(file) then
if req_tell("Ok to append to that clip?")=0 then call quit
if lastpos('/',file,length(file)-1)~=0 then do
filenam=right(file,(length(file)-lastpos('/',file,length(file)-1)))
path=left(file,(lastpos('/',file,length(file))-1))
end
else do
filenam=right(file,(length(file)-lastpos(':',file,length(file)-1)))
path=left(file,(lastpos(':',file,length(file))))
end
call pragma("D",path)
path=pragma("D","RAM:")
file=path||filenam
call req_error("This is the delay interval between grabs. (30 Frames = 1 second delay)")
delay=0
do while(delay<1)
delay=req_number("Delay In Frames",'30')
if delay="CANCEL" then call quit
end
call req_error("Example: 150 frames = 5 seconds.")
count=0
do while(count<1)
count=req_number("Number Of Frames To Grab",150)
if count=0 then call quit
if count="CANCEL" then call quit
end
call req_error("Note: HQ-5 selection will only work if HQ-5 is turned on in the options panel.")
compression=-1
buttons='000'
do while compression=-1
buttons=req_buttons("Choose Compression:",buttons,"HQ-5","Standard","Extended")
if buttons="CANCEL" then call quit
if buttons="100" then do
compression=3
end
if buttons="010" then do
compression=0
end
if buttons="001" then do
compression=1
end
end
vidinput="-1"
buttons='1000'
do while vidinput="-1"
buttons=req_buttons("Choose Input:",buttons,"Main 1","Main 2","Main 3","Main 4")
if buttons="CANCEL" then call quit
if buttons="1000" then do
vidinput="001"
end
if buttons="0100" then do
vidinput="002"
end
if buttons="0010" then do
vidinput="003"
end
if buttons="0001" then do
vidinput="004"
end
end
if count="" then count=10
if req_tell("Click 'Continue' to begin.")=0 then call quit
call req_error("")
call req_open("Working.... Please wait.")
Switcher(M||vidinput)
Switcher(P||vidinput)
if ~exists("toaster:programs/flyer_support/c/setplaymode") then do
call req_tell("Error:","I am missing the program","'SetPlayMode' in your","Programs/Flyer_Support/c directory")
call quit()
end
if ~exists("toaster:programs/flyer_support/c/AppendFields") then do
call req_tell("Error:","I am missing the program","'AppendFields' in your","Programs/Flyer_Support/c directory")
call quit()
end
address command "toaster:programs/flyer_support/c/setplaymode 0 REC"
do f=0 to count
address command "toaster:programs/flyer_support/c/appendfields "||file||" 2 "compression" >env:output"
open(state, "env:output", R)
null=readln(state)
if left(readln(state),8)="Error 33" then do
address command "toaster:programs/flyer_support/c/setplaymode 0 PLAY"
call req_tell("Error:"," Your flyer drive is Full!")
call req_close()
call quit()
end
call close state
call req_error("TimeLapse: Current Frame ("||f||") Frames to go ("||count-f||") Delay ("||delay||")")
Switcher(FRES) /* Reset frame counter */
Switcher(WAIT,delay) /* address command "c:wait "||delay */
end
address command "toaster:programs/flyer_support/c/setplaymode 0 PLAY"
call req_close()
call req_error("")
icontime=REQ_FLYERJOG("Choose frame for icon.",file,1)
if icontime="CANCEL" then call quit()
icontime=icontime*2
call MAKEICON(file,icontime)
call req_error("All done.")
call req_error("")
call req_close()
call remlib('ToasterARexx.port')
call remlib('PROJECT_REXX_PORT')
exit
quit: PROCEDURE
call req_error("Canceled.")
call req_close()
call remlib('ToasterARexx.port')
call remlib('PROJECT_REXX_PORT')
exit